package com.example.rightmost.entity;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @author:javayhch
 * @date:2024/8/17
 * @description:
 */
@Data
@AllArgsConstructor
public class Result {

    //状态码
    private int code;

    //状态说明
    private String message;

    private Object object;

    public static Result success(Object object){
        return new Result(200, "success", object);
    }


    public static Result success(){
        return new Result(200, "success", null);
    }

    public static Result error(String message){
        return new Result(201, message, null);
    }


}

